var  Backbone = require("backbone");
var VoaModel =require("../model/VoaModel.js");

var PageableCollection = require("backbone.paginator");

module.exports =PageableCollection.extend({
      // Tells the Backbone Collection that all of it's models will be of type Model (listed up top as a dependency)
      model: VoaModel,
      
      state:{
            
       pageSize: 50
            
      },
      
       parseState: function (resp, queryParams, state, options) {
          return {totalPages: resp.totalPages,title:resp.title};
        },
        // get the actual records
        parseRecords: function (resp, options) {
          return resp.itemArray;
        }

    });
